package com.bulk.demo.insert.controller;

import com.bulk.demo.insert.service.IThreadCallbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * mysql 多线程 异常回滚 演示。
 *
 * @author 散装java
 * @since 2022/6/25
 */
@RestController
@RequestMapping("/thread")
public class ThreadCallbackController {
    @Autowired
    private IThreadCallbackService threadCallbackService;

    @RequestMapping("/")
    public String threadCallbackTest1() {
        threadCallbackService.threadCallback2();
        return "ok";
    }
}
